package top.bigdata.model.dto.author;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import top.bigdata.model.entity.Author;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class HotAuthor {
    private long mid;
    private String name;
    private String sex;
    private String face;
    private long follower;

    @Schema(description = "平均播放量", example = "1000000")
    private long view;

    @Schema(description = "平均点赞数", example = "100000")
    private int like;

    @Schema(description = "平均硬币数", example = "100000")
    private int coin;

    @Schema(description = "平均收藏数", example = "100000")
    private int favorite;

    @Schema(description = "平均弹幕数", example = "100000")
    private int danmaku;

    @Schema(description = "平均评论数", example = "100000")
    private int reply;

    @Schema(description = "视频数")
    private int count;

    public void fromAuthorInfo(Author author) {
        this.name = author.getName();
        this.sex = author.getSex();
        this.face = author.getFace();
        this.follower = author.getFollower();
    }
}
